<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>审核</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="/assets/layui-v2.5.5/css/layui.css" media="all" />
</head>
<body>
<div class="layui-fluid" style="margin-top:10%;">
<form class="layui-form" action="" enctype="multipart/form-data">
   <div class="layui-form-item">
      <label class="layui-form-label">审核</label>
      <div class="layui-input-inline">
        <select name="isCheck" lay-verify="required" lay-search="">
          <option value="">请选择</option>
          <option value="未审">未审</option>
          <option value="通过">通过</option>
          <option value="未通过">未通过</option>
        </select>
      </div>
    </div>
  <div class="layui-form-item">
		<div class="layui-input-block" style="text-align: center;margin:0 auto;">
			<button class="layui-btn" lay-submit="" lay-filter="submit-teacher">保存</button> 
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</div>
</form>
</div>
<script src="/assets/layui-v2.5.5/layui.js" charset="utf-8"></script> 
<script type="text/javascript">				        
        var $,form,id;
		id='#(id)';
		layui.use(['form','jquery'], function(){
		form = layui.form;
		$ = layui.$;
		form.on('submit(submit-teacher)', function(obj){
			teacherCheck(obj.field);
			return false;
			});
		});
		function teacherCheck(params){
			params.id=id;
			$.ajax({
			    url : '/teacher/teacherChecks',
				type : "post",
				data : params,
				dataType : "json",
				success : function(ret) {
					if (ret.state == 'ok') {
						layer.msg(ret.msg, {icon: 1, offset: '15px', time: 600}, function(){
							var index = parent.layer.getFrameIndex(window.name);
							parent.layer.close(index);
							parent.$(".layui-laypage-btn").click();
						});
					} else {
						layer.msg(ret.msg, {icon: 2, offset: '10px'});
					}
				},
				error: function() {
		      } 
		  });
		}
</script>
</body>
</html>